]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
iconGrid: Use class handlers for ::child-{added,removed}
authorZander Brown <zbrown@gnome.org>
Thu, 9 Nov 2023 15:44:00 +0000 (15:44 +0000)
committerZander Brown <zbrown@gnome.org>
Tue, 14 Nov 2023 11:11:03 +0000 (11:11 +0000)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

js/ui/iconGrid.js

index 916d69ce412a317c819ec6aa051b81cc9a79667d..d55f30d135ee823b5c1078367ed782e12da244d7 100644 (file)
@@ -1192,12 +1192,10 @@ export const IconGrid = GObject.registerClass({
         this._currentPage = 0;
         this._currentMode = -1;
 
-        this.connect('child-added', this._childAdded.bind(this));
-        this.connect('child-removed', this._childRemoved.bind(this));
         this.connect('destroy', () => layoutManager.disconnect(pagesChangedId));
     }
 
-    _childAdded(grid, child) {
+    vfunc_child_added(child) {
         child._iconGridKeyFocusInId = child.connect('key-focus-in', () => {
             this._ensureItemIsVisible(child);
         });
@@ -1247,7 +1245,7 @@ export const IconGrid = GObject.registerClass({
         this._setGridMode(bestMode);
     }
 
-    _childRemoved(grid, child) {
+    vfunc_child_removed(child) {
         child.disconnect(child._iconGridKeyFocusInId);
         delete child._iconGridKeyFocusInId;
     }